Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tikkhun/config-core

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tikkhun/config-core

config 其实就是将分布式的配置源合并起来, 最终将他转化成集中式管理的一个配置文件.

  • 0.1.14
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

config

config 其实就是将分布式的配置源合并起来, 最终将他转化成集中式管理的一个配置文件.

并且实现get set reset remove 的api操作.

source 配置源

实现 load 方法让 config 可以从source处加载到配置对象.

EnvSource

经常使用.env进行配置,但经常需要转换成对象使用 默认分隔符为__ 一般不会冲突

store 存储器

存储所有加载的配置 并且可以获取这些配置 默认使用memorystore. 你可以编写自己的store

使用

详见example

import { DEFAULT_ENV_MANAGER } from '@tikkhun/config';
console.log(`env`, DEFAULT_ENV_MANAGER.get()); // 获取全部
console.log(`env`, DEFAULT_ENV_MANAGER.get({ path: 'c.c.c' })); // 支持 path形式获取

FAQs

Package last updated on 13 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc